It is known that a portable electronic device such as mobile phone switches display and non-display of a specific item (for example, folder) on a screen as a user inputs a handwritten pattern, from a standpoint of security. In this electronic device, a handwritten pattern is preset by performing a tracing operation on a touch panel, for example, and the display/non-display of the specific item is switched when the input handwritten pattern coincides with the preset handwritten pattern. (for example, refer to JP-A-2011-8697)